//q2a.cpp
//The program takes 3 numbers and print them by the order of their value.
//
//Binyamin 22 december 2017
//-----------------------------------------------------------
#include <iostream>

using namespace std;

// 1. Prompt the user for three numbers.
// 2. Store the three numbers.
// 3. calculate their order.
// 4. print the appropraite order.

int main()
{
	int num0, num1, num2; // num* - used to store the numbers from the user.

	// inputs
	cout << "Please enter three numbers" << endl;
	cin >> num0 >> num1 >> num2;


	// printing
	cout << "The order of the numbers is:" << endl;
	if(num0 > num1)
	{
		if(num2 > num0)
		{
			cout << num2 << endl << num0 << endl << num1;
		}
		else if(num1 < num2)
		{
			cout << num0 << endl << num2 << endl << num1;
		}
		else //num1 > num2
		{
			cout << num0 << endl << num1 << endl << num2;
		}
	}
	else // num0 < num1
	{
		if(num2 > num1)
		{
			cout << num2 << endl << num1 << endl << num0;
		}
		else if(num0 < num2)
		{
			cout << num1 << endl << num2 << endl << num0;
		}
		else
		{
			cout << num1 << endl << num0 << endl << num2;
		}
	}
	return 0;
}
//output
//Please enter three numbers
//13 12 14
//The order of the numbers is:
//14
//13
//12
